package editor3d;
import java.util.*;
public class Metodo extends Simbolo{
	private TablaSimbolo tonta = new TablaSimbolo();
	protected LinkedList <Param> param = null;

	public void setParametros(LinkedList <Param> param){
		this.param = param;
	}
	public LinkedList <Param> getParametros(){
		return param;
	}

	public TablaSimbolo getSimbolos(){
		return tonta;
	}
	public void setSimbolos(TablaSimbolo tonta){
		this.tonta = tonta;
	}

	public int getTamanio(){
		int temp = 0;
		for(int i = 0; i<tonta.size(); i++){
			temp += tonta.get(i).getTamanio();
		}
		return temp;
	}

	@Override
	public String toString(){
		String temp = "";
		temp += "Nombre Metodo: "+nombre+"\n";
		if(param != null){
			temp += "\tParametros:\n";
			for(int i = 0; i< param.size(); i++)
				temp += "\t\t"+i+") "+param.get(i)+"; \n";
		}
		if(tonta.size() > 0)
			temp += "Variables Locales\n"+tonta.toString();
		return temp;
	}
}